package middleware

import (
	"github.com/gin-gonic/gin"
	"zk2/pkg"
)

func LoginMiddleWare(c *gin.Context) {
	token := c.GetHeader("token")
	userId := pkg.NewJwt().GetToken(token)
	c.Set("userId", userId)
	c.Next()
}
